<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BOSS Afterburner: RooFitBuilder.cxx Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BOSS Afterburner
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('RooFitBuilder_8cxx_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">RooFitBuilder.cxx</div>  </div>
</div><!--header-->
<div class="contents">
<a href="RooFitBuilder_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="RooFitBuilder_8h.html">Fit/RooFitBuilder.h</a>&quot;</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Error_8h.html">Functions/Error.h</a>&quot;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;TTimeStamp.h&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;list&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceBOSS__Afterburner_1_1Error.html">BOSS_Afterburner::Error</a>;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#a2b8a98ca56b4b8f9d233a52098a729b9">    9</a></span>&#160;RooRealVar* <a class="code" href="classRooFitBuilder.html#a2b8a98ca56b4b8f9d233a52098a729b9">RooFitBuilder::BuildVar</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;{</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;  <span class="keywordflow">if</span>(!input[<span class="stringliteral">&quot;value&quot;</span>].IsScalar()) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;YAML variable definition does not contain a value&quot;</span>);</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;  <span class="keyword">auto</span>   value = input[<span class="stringliteral">&quot;value&quot;</span>].as&lt;Double_t&gt;();</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;  <span class="keywordtype">string</span> name  = ExtractName(input);</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;  <span class="keywordtype">string</span> unit;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  <span class="keywordflow">if</span>(!!input[<span class="stringliteral">&quot;unit&quot;</span>] &amp;&amp; input[<span class="stringliteral">&quot;unit&quot;</span>].IsScalar()) unit = input[<span class="stringliteral">&quot;unit&quot;</span>].as&lt;<span class="keywordtype">string</span>&gt;();</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;  <span class="keyword">const</span> <span class="keyword">auto</span>&amp; range = input[<span class="stringliteral">&quot;range&quot;</span>];</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  <span class="keywordflow">if</span>(!!range &amp;&amp; range.size() == 2)</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">new</span> RooRealVar(name.c_str(), name.c_str(), value, range[0].as&lt;Double_t&gt;(),</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;                          range[1].as&lt;Double_t&gt;(), unit.c_str());</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> RooRealVar(name.c_str(), name.c_str(), value, unit.c_str());</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;}</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#a8ebfd2bde4168482ecaaa9857b24c460">   24</a></span>&#160;RooBreitWigner* <a class="code" href="classRooFitBuilder.html#a8ebfd2bde4168482ecaaa9857b24c460">RooFitBuilder::BuildBreitWigner</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;{</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keyword">auto</span> name  = ExtractName(input);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;  <span class="keyword">auto</span> mean  = BuildVar(input[<span class="stringliteral">&quot;mean&quot;</span>]);</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;  <span class="keyword">auto</span> sigma = BuildVar(input[<span class="stringliteral">&quot;sigma&quot;</span>]);</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> RooBreitWigner(name.c_str(), name.c_str(), fVar, *mean, *sigma);</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;}</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#aef11dd6c42113c2c50fe6b48de189f12">   33</a></span>&#160;<a class="code" href="classRooBreitWignerWave.html">RooBreitWignerWave</a>* <a class="code" href="classRooFitBuilder.html#aef11dd6c42113c2c50fe6b48de189f12">RooFitBuilder::BuildPwave</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;{</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;  <span class="keyword">auto</span> name  = ExtractName(input);</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <span class="keyword">auto</span> mean  = BuildVar(input[<span class="stringliteral">&quot;mean&quot;</span>]);</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keyword">auto</span> sigma = BuildVar(input[<span class="stringliteral">&quot;sigma&quot;</span>]);</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  <span class="keyword">auto</span> l     = <span class="keyword">new</span> RooRealVar(<span class="stringliteral">&quot;l&quot;</span>, <span class="stringliteral">&quot;l&quot;</span>, 1.);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classRooBreitWignerWave.html">RooBreitWignerWave</a>(name.c_str(), name.c_str(), fVar, *mean, *sigma, *l);</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;}</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#a13add034a17ce8e8339ed9419f2204f1">   43</a></span>&#160;RooAddPdf* <a class="code" href="classRooFitBuilder.html#a13add034a17ce8e8339ed9419f2204f1">RooFitBuilder::BuildGaussians</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;{</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="keywordflow">if</span>(!input[<span class="stringliteral">&quot;sigmas&quot;</span>].IsSequence()) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Does not contain sigma list&quot;</span>);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  <span class="keyword">auto</span> mean = BuildVar(input[<span class="stringliteral">&quot;mean&quot;</span>]);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  <span class="keywordflow">if</span>(!mean) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Mean has not been defined&quot;</span>);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="keyword">auto</span>        gaussians = <span class="keyword">new</span> RooArgList;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="keyword">auto</span>        coeff     = <span class="keyword">new</span> RooArgList;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  <span class="keyword">const</span> <span class="keyword">auto</span>&amp; sigmadefs = input[<span class="stringliteral">&quot;sigmas&quot;</span>];</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;  <span class="keyword">const</span> <span class="keyword">auto</span>&amp; ratiodefs = input[<span class="stringliteral">&quot;ratios&quot;</span>];</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  Int_t n = sigmadefs.size();</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  Int_t r = 0;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keywordflow">if</span>(ratiodefs) r = input[<span class="stringliteral">&quot;ratios&quot;</span>].size();</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <span class="keywordflow">for</span>(Int_t i = 0; i &lt; n; ++i)</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  {</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keyword">auto</span> sigma = BuildVar(sigmadefs[i]);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    sigma-&gt;setUnit(mean-&gt;getUnit());</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    sigma-&gt;SetName(Form(<span class="stringliteral">&quot;#sigma_{gauss%d}&quot;</span>, i + 1));</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">char</span>* rationame = Form(<span class="stringliteral">&quot;#it{N}_{gauss%d}&quot;</span>, i + 1);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    RooRealVar* ratio     = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">if</span>(i &lt; r)</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;      ratio = BuildVar(ratiodefs[i]);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;      ratio = <span class="keyword">new</span> RooRealVar(rationame, rationame, .1, 0, 1);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    ratio-&gt;SetName(rationame);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordtype">string</span> name = Form(<span class="stringliteral">&quot;Gaussian_{%d}&quot;</span>, i);</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    gaussians-&gt;add(*(<span class="keyword">new</span> RooGaussian(name.c_str(), name.c_str(), fVar, *mean, *sigma)));</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keywordflow">if</span>(i &lt; n - 1) coeff-&gt;add(*ratio);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  }</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="keywordflow">return</span> AddPdfs(gaussians, coeff);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;}</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#aa7a2f20b708a0d75c2a5d82ce24e8b93">   78</a></span>&#160;RooGaussian* <a class="code" href="classRooFitBuilder.html#aa7a2f20b708a0d75c2a5d82ce24e8b93">RooFitBuilder::BuildGaussian</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;{</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keyword">auto</span> name  = ExtractName(input);</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keyword">auto</span> mean  = BuildVar(input[<span class="stringliteral">&quot;mean&quot;</span>]);</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keyword">auto</span> sigma = BuildVar(input[<span class="stringliteral">&quot;sigma&quot;</span>]);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keywordflow">if</span>(!mean || !sigma) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Nullptrs in variables&quot;</span>);</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> RooGaussian(name.c_str(), name.c_str(), fVar, *mean, *sigma);</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;}</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#ab8dd8c1b179a2c462a080edd63c39115">   88</a></span>&#160;<a class="code" href="classRooTruncatedPolynomial.html">RooTruncatedPolynomial</a>* <a class="code" href="classRooFitBuilder.html#ab8dd8c1b179a2c462a080edd63c39115">RooFitBuilder::BuildTruncatedPolynomial</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;{</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keyword">auto</span> name = ExtractName(input);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <span class="keyword">auto</span> m0   = BuildVar(input[<span class="stringliteral">&quot;m0&quot;</span>]);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="keyword">auto</span> a    = BuildVar(input[<span class="stringliteral">&quot;a&quot;</span>]);</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  <span class="keyword">auto</span> b    = BuildVar(input[<span class="stringliteral">&quot;b&quot;</span>]);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <span class="keyword">auto</span> <a class="code" href="namespacevalues.html#a033b943df6ca20602e77c3a93cbebd92">c</a>    = BuildVar(input[<span class="stringliteral">&quot;c&quot;</span>]);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classRooTruncatedPolynomial.html">RooTruncatedPolynomial</a>(name.c_str(), name.c_str(), fVar, *m0, *a, *b, *<a class="code" href="namespacevalues.html#a033b943df6ca20602e77c3a93cbebd92">c</a>);</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#afe47ae698c86d364d05c01a045f77eb1">   99</a></span>&#160;RooArgusBG* <a class="code" href="classRooFitBuilder.html#afe47ae698c86d364d05c01a045f77eb1">RooFitBuilder::BuildArgus</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;{</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  <span class="keyword">auto</span> name = ExtractName(input);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;  <span class="keyword">auto</span> m0   = BuildVar(input[<span class="stringliteral">&quot;m0&quot;</span>]);</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  <span class="keyword">auto</span> <a class="code" href="namespacevalues.html#a033b943df6ca20602e77c3a93cbebd92">c</a>    = BuildVar(input[<span class="stringliteral">&quot;c&quot;</span>]);</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keyword">auto</span> <a class="code" href="namespacevalues.html#aa7df32bde35ec97ac4a41de71d7d969f">p</a>    = BuildVar(input[<span class="stringliteral">&quot;p&quot;</span>]);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> RooArgusBG(name.c_str(), name.c_str(), fVar, *m0, *<a class="code" href="namespacevalues.html#a033b943df6ca20602e77c3a93cbebd92">c</a>, *<a class="code" href="namespacevalues.html#aa7df32bde35ec97ac4a41de71d7d969f">p</a>);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#a52217258b291856756338efeee95e54c">  109</a></span>&#160;RooVoigtian* <a class="code" href="classRooFitBuilder.html#a52217258b291856756338efeee95e54c">RooFitBuilder::BuildVoigtian</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;{</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  <span class="keyword">auto</span> name  = ExtractName(input);</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="keyword">auto</span> mean  = BuildVar(input[<span class="stringliteral">&quot;mean&quot;</span>]);</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keyword">auto</span> width = BuildVar(input[<span class="stringliteral">&quot;width&quot;</span>]);</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;  <span class="keyword">auto</span> sigma = BuildVar(input[<span class="stringliteral">&quot;sigma&quot;</span>]);</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> RooVoigtian(name.c_str(), name.c_str(), fVar, *mean, *width, *sigma);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;}</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#a07d5cf5009325acd8369810ec583e791">  119</a></span>&#160;RooFFTConvPdf* <a class="code" href="classRooFitBuilder.html#a07d5cf5009325acd8369810ec583e791">RooFitBuilder::ConvolutePdf</a>(RooAbsPdf* pdf1, RooAbsPdf* pdf2)</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;{</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <span class="keywordflow">if</span>(!pdf1 || !pdf2) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Nullptr pdfs&quot;</span>);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keywordtype">string</span> name = Form(<span class="stringliteral">&quot;%s convoluted with %s&quot;</span>, pdf1-&gt;GetName(), pdf2-&gt;GetName());</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> RooFFTConvPdf(name.c_str(), name.c_str(), fVar, *pdf1, *pdf2);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;}</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#a9cd347c2b381af26e199eb9d37b03003">  126</a></span>&#160;RooAddPdf* <a class="code" href="classRooFitBuilder.html#a9cd347c2b381af26e199eb9d37b03003">RooFitBuilder::AddPdfs</a>(RooArgList* pdfs, RooArgList* ratios)</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;{</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="keyword">auto</span> n = pdfs-&gt;getSize();</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="keywordflow">if</span>(n &lt; 1) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Cannot add fewer than one pdf&quot;</span>);</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="keywordflow">if</span>(n - 1 != ratios-&gt;getSize() &amp;&amp; n != ratios-&gt;getSize())</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(Form(<span class="stringliteral">&quot;Ratios inconsistent with pdf list (%d | %d)&quot;</span>, n, ratios-&gt;getSize()));</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="keywordtype">string</span> name = pdfs-&gt;at(0)-&gt;GetName();</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="keywordflow">for</span>(Int_t i = 0; i &lt; n; ++i)</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    name += Form(<span class="stringliteral">&quot;+%s&quot;</span>, pdfs-&gt;at(i)-&gt;GetName());</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> RooAddPdf(name.c_str(), name.c_str(), *pdfs, *ratios);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;}</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="classRooFitBuilder.html#a82d114af262fc0f385b84082b1a8433d">  138</a></span>&#160;<span class="keywordtype">string</span> <a class="code" href="classRooFitBuilder.html#a82d114af262fc0f385b84082b1a8433d">RooFitBuilder::ExtractName</a>(<span class="keyword">const</span> YAML::Node&amp; input)</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;{</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <span class="keywordflow">if</span>(!input) <a class="code" href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a>(<span class="stringliteral">&quot;Empty YAML input&quot;</span>);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  TTimeStamp stamp;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <span class="keywordtype">string</span>     name = Form(<span class="stringliteral">&quot;roo_%d&quot;</span>, stamp.GetNanoSec());</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;  <span class="keywordflow">if</span>(!!input[<span class="stringliteral">&quot;name&quot;</span>] &amp;&amp; input[<span class="stringliteral">&quot;name&quot;</span>].IsScalar()) name = input[<span class="stringliteral">&quot;name&quot;</span>].as&lt;string&gt;();</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="keywordflow">return</span> name;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div><div class="ttc" id="RooFitBuilder_8h_html"><div class="ttname"><a href="RooFitBuilder_8h.html">RooFitBuilder.h</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_aef11dd6c42113c2c50fe6b48de189f12"><div class="ttname"><a href="classRooFitBuilder.html#aef11dd6c42113c2c50fe6b48de189f12">RooFitBuilder::BuildPwave</a></div><div class="ttdeci">RooBreitWignerWave * BuildPwave(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00033">RooFitBuilder.cxx:33</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_a9cd347c2b381af26e199eb9d37b03003"><div class="ttname"><a href="classRooFitBuilder.html#a9cd347c2b381af26e199eb9d37b03003">RooFitBuilder::AddPdfs</a></div><div class="ttdeci">RooAddPdf * AddPdfs(RooArgList *pdfs, RooArgList *ratios)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00126">RooFitBuilder.cxx:126</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_a2b8a98ca56b4b8f9d233a52098a729b9"><div class="ttname"><a href="classRooFitBuilder.html#a2b8a98ca56b4b8f9d233a52098a729b9">RooFitBuilder::BuildVar</a></div><div class="ttdeci">RooRealVar * BuildVar(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00009">RooFitBuilder.cxx:9</a></div></div>
<div class="ttc" id="classRooBreitWignerWave_html"><div class="ttname"><a href="classRooBreitWignerWave.html">RooBreitWignerWave</a></div><div class="ttdef"><b>Definition:</b> <a href="RooBreitWignerWave_8h_source.html#l00013">RooBreitWignerWave.h:13</a></div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_ab8dd8c1b179a2c462a080edd63c39115"><div class="ttname"><a href="classRooFitBuilder.html#ab8dd8c1b179a2c462a080edd63c39115">RooFitBuilder::BuildTruncatedPolynomial</a></div><div class="ttdeci">RooTruncatedPolynomial * BuildTruncatedPolynomial(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00088">RooFitBuilder.cxx:88</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_a13add034a17ce8e8339ed9419f2204f1"><div class="ttname"><a href="classRooFitBuilder.html#a13add034a17ce8e8339ed9419f2204f1">RooFitBuilder::BuildGaussians</a></div><div class="ttdeci">RooAddPdf * BuildGaussians(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00043">RooFitBuilder.cxx:43</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_a8ebfd2bde4168482ecaaa9857b24c460"><div class="ttname"><a href="classRooFitBuilder.html#a8ebfd2bde4168482ecaaa9857b24c460">RooFitBuilder::BuildBreitWigner</a></div><div class="ttdeci">RooBreitWigner * BuildBreitWigner(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00024">RooFitBuilder.cxx:24</a></div></div>
<div class="ttc" id="Error_8h_html"><div class="ttname"><a href="Error_8h.html">Error.h</a></div></div>
<div class="ttc" id="namespacevalues_html_a033b943df6ca20602e77c3a93cbebd92"><div class="ttname"><a href="namespacevalues.html#a033b943df6ca20602e77c3a93cbebd92">values::c</a></div><div class="ttdeci">vector&lt; double &gt; c</div><div class="ttdef"><b>Definition:</b> <a href="DrawArgusShapes_8C_source.html#l00015">DrawArgusShapes.C:15</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_a82d114af262fc0f385b84082b1a8433d"><div class="ttname"><a href="classRooFitBuilder.html#a82d114af262fc0f385b84082b1a8433d">RooFitBuilder::ExtractName</a></div><div class="ttdeci">std::string ExtractName(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00138">RooFitBuilder.cxx:138</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_afe47ae698c86d364d05c01a045f77eb1"><div class="ttname"><a href="classRooFitBuilder.html#afe47ae698c86d364d05c01a045f77eb1">RooFitBuilder::BuildArgus</a></div><div class="ttdeci">RooArgusBG * BuildArgus(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00099">RooFitBuilder.cxx:99</a></div></div>
<div class="ttc" id="namespacevalues_html_aa7df32bde35ec97ac4a41de71d7d969f"><div class="ttname"><a href="namespacevalues.html#aa7df32bde35ec97ac4a41de71d7d969f">values::p</a></div><div class="ttdeci">vector&lt; double &gt; p</div><div class="ttdef"><b>Definition:</b> <a href="DrawArgusShapes_8C_source.html#l00016">DrawArgusShapes.C:16</a></div></div>
<div class="ttc" id="namespaceBOSS__Afterburner_1_1Error_html"><div class="ttname"><a href="namespaceBOSS__Afterburner_1_1Error.html">BOSS_Afterburner::Error</a></div><div class="ttdef"><b>Definition:</b> <a href="Error_8h_source.html#l00018">Error.h:18</a></div></div>
<div class="ttc" id="Error_8h_html_aebda0a072e31a60b750222e289297538"><div class="ttname"><a href="Error_8h.html#aebda0a072e31a60b750222e289297538">EXCEPTION</a></div><div class="ttdeci">#define EXCEPTION(VARIABLE)</div><div class="ttdef"><b>Definition:</b> <a href="Error_8h_source.html#l00007">Error.h:7</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_a07d5cf5009325acd8369810ec583e791"><div class="ttname"><a href="classRooFitBuilder.html#a07d5cf5009325acd8369810ec583e791">RooFitBuilder::ConvolutePdf</a></div><div class="ttdeci">RooFFTConvPdf * ConvolutePdf(RooAbsPdf *pdf1, RooAbsPdf *pdf2)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00119">RooFitBuilder.cxx:119</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_aa7a2f20b708a0d75c2a5d82ce24e8b93"><div class="ttname"><a href="classRooFitBuilder.html#aa7a2f20b708a0d75c2a5d82ce24e8b93">RooFitBuilder::BuildGaussian</a></div><div class="ttdeci">RooGaussian * BuildGaussian(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00078">RooFitBuilder.cxx:78</a></div></div>
<div class="ttc" id="classRooFitBuilder_html_a52217258b291856756338efeee95e54c"><div class="ttname"><a href="classRooFitBuilder.html#a52217258b291856756338efeee95e54c">RooFitBuilder::BuildVoigtian</a></div><div class="ttdeci">RooVoigtian * BuildVoigtian(const YAML::Node &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="RooFitBuilder_8cxx_source.html#l00109">RooFitBuilder.cxx:109</a></div></div>
<div class="ttc" id="classRooTruncatedPolynomial_html"><div class="ttname"><a href="classRooTruncatedPolynomial.html">RooTruncatedPolynomial</a></div><div class="ttdoc"> </div><div class="ttdef"><b>Definition:</b> <a href="RooTruncatedPolynomial_8h_source.html#l00014">RooTruncatedPolynomial.h:14</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_51877cf65585268910af27dd76026cda.html">Fit</a></li><li class="navelem"><a class="el" href="RooFitBuilder_8cxx.html">RooFitBuilder.cxx</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
